<template>
  <div class="wangji content">
    <div class="wangji-job">
      <router-link to="/shezi"><span><</span></router-link>
      <router-link to="/xiugai"><div>修改登录密码</div></router-link>
      <span class="dd"></span>
    </div>
    <div class="shuru">
      <div>+86<input v-model="phone" placeholder="15800000210" /></div>
    </div>
    <div class="yanzhengma">
      <div>
        密码<input v-model="phone1" placeholder="请设置您的登录密码6~12位" />
      </div>
    </div>
    <div class="yanzhengma">
      <div>
        密码<input
          v-model="phone2"
          placeholder="请再次输入您的登录密码6~12位"
        />
      </div>
    </div>
    <div class="yanzhengma">
      <div><input placeholder="请输入您的验证码" /><span>发送验证码</span></div>
    </div>
    <div class="btn content" @click="open">确认提交</div>
  </div>
</template>
<style scoped>
.content {
  width: 375px;
  margin: 0 auto;
}
.wangji-job {
  display: flex;
  justify-content: space-between;
  padding: 10px;
  border-bottom: 1px solid #ccc;
}
.wangji-job div {
  color: rgb(9, 182, 116);
}
.dd {
  display: inline-block;
  width: 1px;
  height: 1px;
}
.shuru {
  padding: 20px;
  border-bottom: 1px solid #ccc;
}
.yanzhengma {
  display: flex;
  padding: 20px;
  border-bottom: 1px solid #ccc;
}
.yanzhengma span {
  background-color: rgb(9, 182, 116);
  height: 23px;
  line-height: 23px;
  margin: 0 5px;
  padding: 0 5px;
  color: #fff;
}
.btn {
  width: 300px;
  margin-top: 200px;
  text-align: center;
  background-color: rgb(9, 182, 116);
  border-radius: 25px;
  color: #fff;
  padding: 10px;
}
</style>
<script setup>
import { useRouter } from "vue-router";
import axios from "axios";
import { ref } from "vue";
const router = useRouter();

let phone = ref("");
let phone1 = ref("");
let phone2 = ref("");
  
function open() {
    // router.push("/mynot");
  axios
    .post(
      "https://fc-mp-827be4c1-176f-4e1f-985a-621b4417eadf.next.bspapp.com/api/user/kh/resetPwd",
      {
        uid: '65e97db68b0da4a4e4b996c5',
        password: phone1.value,
        
      },
      {
        headers:{
          ['uni-id-token']:localStorage.getItem("token")
        }
      }
    )
    .then((res)=>{
        console.log(res);
    })
    
}
</script>
